package com.zhoupeisen.feign;

import com.zhoupeisen.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * create by Administrator on  下午 10:56
 * 声明需要调用的微服务的名称
 * 声明需要调用的微服务接口
 */
@FeignClient(name = "productService")
public interface ProductFeignClient {
    /*声明需要调用的微服务接口*/
    @RequestMapping(value = "/product/{id}",method = RequestMethod.GET)
    public Product findById(@PathVariable("id") Long id);
}
